﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Umbraco.Framework;
using Umbraco.Framework.Persistence.Model.Attribution.MetaData;
using Umbraco.Framework.Persistence.Model.Constants.SerializationTypes;

namespace WebGarden.Hive.Providers.Products.Schema.Model.AttributeTypes
{
    /// <summary>
	/// This class has been copied directly from the Wordpress provider (just changed the namespace).
	/// These standard Umbraco attribute types may eventually be part of Hive
	/// </summary>
	public class RichTextEditorAttributeType : AttributeType
    {
        public const string AliasValue = "wp-rich-text-editor";

        public RichTextEditorAttributeType()
            : base(
            AliasValue,
            AliasValue, 
            "This type represents a Rich Text Editor",
            new LongStringSerializationType())
        {
            Id = new HiveId(AliasValue.EncodeAsGuid());
            RenderTypeProvider = "D3DC1AC8-F83D-4D73-A13B-024E3100A600";
            RenderTypeProviderConfig = @"
<preValues>
    <preValue name='ShowLabel'><![CDATA[True]]></preValue>
    <preValue name='ShowContextMenu'><![CDATA[False]]></preValue>
    <preValue name='Size'><![CDATA[650x400]]></preValue>
    <preValue name='Features'><![CDATA[backcolor,bold,bullist,numlist,code,image,italic,underline,justifycenter,justifyfull,justifyleft,justifyright,umbracolink,unlink,umbracomacro]]></preValue>
    <preValue name='Stylesheets'><![CDATA[]]></preValue>
</preValues>";
        }
    }
}
